<template>
    <base-breadcrumb>
        <a-form>
            <a-card :body-style="{ padding: '24px 32px' }" :bordered="false">
                <title-name title="节点基本信息"></title-name>
                <a-row :gutter="24">
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="工程名称"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.projectName" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="业务事项"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.businessMatters" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="节点状态"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.statusName" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="阶段/类别"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.type" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="管控级别"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.controLevel" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="周期"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.cycle" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="计划开始时间"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.startTime" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="计划完成时间"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.endTime" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="完成标准"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.standard" type="textarea" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="验证资料"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.validations" type="textarea" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="第一责任人"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.responsible" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                </a-row>

                <a-row :gutter="24">
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="直接责任人"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.responsiblEngineer" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                </a-row>
            </a-card>
            <a-card :body-style="{ padding: '24px 32px', margin: '30px 0 0 0 ' }" :bordered="false">
                <title-name title="节点反馈信息"></title-name>
                <a-row :gutter="24" v-if="dels.feedbackPersonType == null || dels.feedbackPersonType == '1'">
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="反馈人"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.feedbackPerson" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="直接责任人反馈"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.feedbackName" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="直接责任人反馈详情"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseTextarea
                                v-model="dels.feedbackInfo"
                                disabled
                                :title="dels.feedbackInfo"
                            ></BaseTextarea>
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24" v-if="dels.feedbackPersonType == '2'">
                    <a-col :md="8" :sm="8">
                        <a-form-item
                            label="第一责任人反馈"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseInput v-model="dels.feedbackName" type="text" disabled></BaseInput>
                        </a-form-item>
                    </a-col>
                    <a-col :md="24" :sm="24">
                        <a-form-item
                            label="第一责任人反馈详情"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <BaseTextarea
                                v-model="dels.feedbackInfo"
                                type="textarea"
                                disabled
                                :title="dels.feedbackInfo"
                            ></BaseTextarea>
                        </a-form-item>
                    </a-col>
                    <a-col :md="24" :sm="24">
                        <a-form-item
                            label="附件"
                            :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
                            :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
                        >
                            <file-link :file-list="dels.fileInfoList" />
                        </a-form-item>
                    </a-col>
                </a-row>
            </a-card>
            <div class="footer-btns page-btn-right-top">
                <a-button type="primary" @click="handleClose">关闭</a-button>
            </div>
        </a-form>
    </base-breadcrumb>
</template>

<script>
import { getFeedbacksOne } from '@/api/project/feedback'

const columns = [
    {
        title: '序号',
        width: 65,
        dataIndex: 'serial',

        scopedSlots: { customRender: 'serial' }
    },
    {
        title: '附件名称',
        dataIndex: 'name',
        width: '15%'
    },
    {
        title: '附件格式',
        dataIndex: 'format',
        width: '15%'
    },
    {
        title: '附件地址',
        dataIndex: 'address',
        width: '40%'
    },
    {
        title: '操作',
        key: 'action',
        width: '20%',
        scopedSlots: { customRender: 'action' }
    }
]
const data = [
    {
        name: '一级',
        format: 120,
        address: 'income'
    },
    {
        name: '二级',
        format: 120,
        address: 'income'
    },
    {
        name: '三级',
        format: 120,
        address: 'income'
    }
]
export default {
    name: 'a' + Date.now(),
    components: {},
    props: {
        text: String
    },

    data() {
        return {
            data,
            columns,
            feedbackId: '', // 计划下某项目进度id
            dels: {}
        }
    },
    created() {
        this.feedbackId = this.$route.query.feedbackId
        this.getFeedbacksOne()
    },
    computed: {},
    methods: {
        handleClose() {
            this.$multiTab.close(this.$route.fullpath)
        },
        getFeedbacksOne() {
            getFeedbacksOne(this.feedbackId).then((res) => {
                this.dels = res.data
            })
        }
    }
}
</script>

<style lang="less" scoped>
.wrapper-row {
    padding-left: 55px;
    font-weight: bold;
    letter-spacing: 1px;
}

/deep/ .ant-form-item label {
    font-size: 12px;
}

/deep/ .ant-btn {
    border-radius: 5px;
}

/deep/ .ant-calendar-picker-input.ant-input {
    width: 100%;
}

/deep/ .ant-input {
    /*width: 70%;*/
    border-radius: 5px;
}

/deep/ .ant-calendar-picker {
    width: 100%;
    border-radius: 5px;
}

/deep/ .ant-card.ant-card-bordered {
    border-radius: 5px;
}

.ant-avatar-lg {
    width: 48px;
    height: 48px;
    line-height: 48px;
}

.list-content-item {
    color: rgba(0, 0, 0, 0.45);
    display: inline-block;
    vertical-align: middle;
    font-size: 14px;
    margin-left: 40px;
    span {
        line-height: 20px;
    }
    p {
        margin-top: 4px;
        margin-bottom: 0;
        line-height: 22px;
    }
}

.title-name {
    border-left: 5px solid #1890ff;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 20px;
    padding-left: 15px;
    height: 20px;
    line-height: 20px;
}

/deep/ .table-page-search-wrapper .ant-form-inline .ant-row .ant-col.ant-col-sm-24.ant-col-md-12 {
    padding-left: 80px;
}
.footer-btns {
    display: flex;
    justify-content: flex-end;
}
</style>
